import React from 'react'
import Main from '../pages/main/index'
import * as userActionCreators from '../store/actions/user'
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux'

class MainContainer extends React.Component{

    static navigationOptions = {
        header:null
    }

    render(){

        return (

            <Main {...this.props} />
        )
    }

}

const mapStateToProps =  state =>{
    return state.user
}

const mapDispatchToProps = dispatch => {
    const userActions = bindActionCreators(userActionCreators,dispatch)
    return userActions;
}

export default connect(mapStateToProps,mapDispatchToProps)(MainContainer)